<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.4"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Flow: common.hpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">Flow<span id="projectnumber">&#160;2.0.0</span>
   </div>
   <div id="projectbrief">Flow project: Full implementation reference.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#namespaces">Namespaces</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle"><div class="title">common.hpp File Reference</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="detail_2common_8hpp_source.html">flow/detail/common.hpp</a>&quot;</code><br />
<code>#include &lt;boost/chrono/chrono.hpp&gt;</code><br />
<code>#include &lt;boost/chrono/ceil.hpp&gt;</code><br />
<code>#include &lt;boost/chrono/round.hpp&gt;</code><br />
<code>#include &lt;boost/chrono/io/duration_io.hpp&gt;</code><br />
<code>#include &lt;boost/chrono/io/time_point_io.hpp&gt;</code><br />
<code>#include &lt;functional&gt;</code><br />
</div>
<p><a href="common_8hpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1Function_3_01Result_07Args_8_8_8_08_4.html">flow::Function&lt; Result(Args...)&gt;</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Intended as the polymorphic function wrapper of choice for Flow, internally and externally; to be used instead of <code>std::function</code> or <code>boost::function</code>.  <a href="classflow_1_1Function_3_01Result_07Args_8_8_8_08_4.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="namespaces" name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:namespaceflow"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceflow.html">flow</a></td></tr>
<tr class="memdesc:namespaceflow"><td class="mdescLeft">&#160;</td><td class="mdescRight">Catch-all namespace for the Flow project: A collection of various production-quality modules written in modern C++17, originally by ygoldfel. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:abb2f9f3d34f909216637ac16e3321727"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="common_8hpp.html#abb2f9f3d34f909216637ac16e3321727">FLOW_OS_LINUX</a></td></tr>
<tr class="memdesc:abb2f9f3d34f909216637ac16e3321727"><td class="mdescLeft">&#160;</td><td class="mdescRight">Macro that is defined if and only if the compiling environment is Linux.  <a href="common_8hpp.html#abb2f9f3d34f909216637ac16e3321727">More...</a><br /></td></tr>
<tr class="separator:abb2f9f3d34f909216637ac16e3321727"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab38c55048f378ce506da9b5989b36dc5"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="common_8hpp.html#ab38c55048f378ce506da9b5989b36dc5">FLOW_OS_MAC</a></td></tr>
<tr class="memdesc:ab38c55048f378ce506da9b5989b36dc5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Macro that is defined if and only if the compiling environment is Mac OS X or higher macOS (not iOS and such!).  <a href="common_8hpp.html#ab38c55048f378ce506da9b5989b36dc5">More...</a><br /></td></tr>
<tr class="separator:ab38c55048f378ce506da9b5989b36dc5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa97a4a2066a1727fa67917638a569a34"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="common_8hpp.html#aa97a4a2066a1727fa67917638a569a34">FLOW_OS_WIN</a></td></tr>
<tr class="memdesc:aa97a4a2066a1727fa67917638a569a34"><td class="mdescLeft">&#160;</td><td class="mdescRight">Macro that is defined if and only if the compiling environment is Windows.  <a href="common_8hpp.html#aa97a4a2066a1727fa67917638a569a34">More...</a><br /></td></tr>
<tr class="separator:aa97a4a2066a1727fa67917638a569a34"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="typedef-members" name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ae02da22c4a101eaab447511c905e4f32"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceflow.html#ae02da22c4a101eaab447511c905e4f32">flow::uint8_t</a> = unsigned char</td></tr>
<tr class="memdesc:ae02da22c4a101eaab447511c905e4f32"><td class="mdescLeft">&#160;</td><td class="mdescRight">Byte. Best way to represent a byte of binary data. This is 8 bits on all modern systems.  <a href="namespaceflow.html#ae02da22c4a101eaab447511c905e4f32">More...</a><br /></td></tr>
<tr class="separator:ae02da22c4a101eaab447511c905e4f32"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a96b8a241b21c907e96cb91f4bf868446"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceflow.html#a96b8a241b21c907e96cb91f4bf868446">flow::int8_t</a> = signed char</td></tr>
<tr class="memdesc:a96b8a241b21c907e96cb91f4bf868446"><td class="mdescLeft">&#160;</td><td class="mdescRight">Signed byte. Prefer to use <code>uint8_t</code> when representing binary data. This is 8 bits on all modern systems.  <a href="namespaceflow.html#a96b8a241b21c907e96cb91f4bf868446">More...</a><br /></td></tr>
<tr class="separator:a96b8a241b21c907e96cb91f4bf868446"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8f2e48761f9ca3ffcaa29872078bbf00"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceflow.html#a8f2e48761f9ca3ffcaa29872078bbf00">flow::Fine_clock</a> = boost::chrono::high_resolution_clock</td></tr>
<tr class="memdesc:a8f2e48761f9ca3ffcaa29872078bbf00"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clock used for delicate time measurements, such that the <code>now()</code> method gets the current time relative to some unknown but constant epoch (reference point).  <a href="namespaceflow.html#a8f2e48761f9ca3ffcaa29872078bbf00">More...</a><br /></td></tr>
<tr class="separator:a8f2e48761f9ca3ffcaa29872078bbf00"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9d9cc2eeb10d398cff5591d446b763b8"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceflow.html#a9d9cc2eeb10d398cff5591d446b763b8">flow::Fine_time_pt</a> = Fine_clock::time_point</td></tr>
<tr class="memdesc:a9d9cc2eeb10d398cff5591d446b763b8"><td class="mdescLeft">&#160;</td><td class="mdescRight">A high-res time point as returned by <code>Fine_clock::now()</code> and suitable for precise time math in general.  <a href="namespaceflow.html#a9d9cc2eeb10d398cff5591d446b763b8">More...</a><br /></td></tr>
<tr class="separator:a9d9cc2eeb10d398cff5591d446b763b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a48799f1263cdeedec125be51a3db2b79"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceflow.html#a48799f1263cdeedec125be51a3db2b79">flow::Fine_duration</a> = Fine_clock::duration</td></tr>
<tr class="memdesc:a48799f1263cdeedec125be51a3db2b79"><td class="mdescLeft">&#160;</td><td class="mdescRight">A high-res time duration as computed from two <code>Fine_time_pt</code>s.  <a href="namespaceflow.html#a48799f1263cdeedec125be51a3db2b79">More...</a><br /></td></tr>
<tr class="separator:a48799f1263cdeedec125be51a3db2b79"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a29eaaa9d0fac4ce87d8b969222dbed09"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceflow.html#a29eaaa9d0fac4ce87d8b969222dbed09">flow::Error_code</a> = boost::system::error_code</td></tr>
<tr class="memdesc:a29eaaa9d0fac4ce87d8b969222dbed09"><td class="mdescLeft">&#160;</td><td class="mdescRight">Short-hand for a <a class="el" href="namespaceboost_1_1system.html" title="We may add some ADL-based overloads into this namespace outside flow.">boost.system</a> error code (which basically encapsulates an integer/<code>enum</code> error code and a pointer through which to obtain a statically stored message string); this is how Flow modules report errors to the user; and we humbly recommended all C++ code use the same techniques.  <a href="namespaceflow.html#a29eaaa9d0fac4ce87d8b969222dbed09">More...</a><br /></td></tr>
<tr class="separator:a29eaaa9d0fac4ce87d8b969222dbed09"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="enum-members" name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:a3938730ab4b89daf13d027a5f620e7ce"><td class="memItemLeft" align="right" valign="top">enum class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceflow.html#a3938730ab4b89daf13d027a5f620e7ce">flow::Flow_log_component</a> { <a class="el" href="namespaceflow.html#a3938730ab4b89daf13d027a5f620e7cea6fba12db09e5bebfaa04f6372c41c2cf">flow::S_END_SENTINEL</a>
 }</td></tr>
<tr class="memdesc:a3938730ab4b89daf13d027a5f620e7ce"><td class="mdescLeft">&#160;</td><td class="mdescRight">The <a class="el" href="classflow_1_1log_1_1Component.html" title="A light-weight class, each object storing a component payload encoding an enum value from enum type o...">flow::log::Component</a> payload enumeration comprising various log components used by Flow's own internal logging.  <a href="namespaceflow.html#a3938730ab4b89daf13d027a5f620e7ce">More...</a><br /></td></tr>
<tr class="separator:a3938730ab4b89daf13d027a5f620e7ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="var-members" name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:abef6a1249edc3dd6c7f650235a84bfe4"><td class="memItemLeft" align="right" valign="top">const boost::unordered_multimap&lt; Flow_log_component, std::string &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceflow.html#abef6a1249edc3dd6c7f650235a84bfe4">flow::S_FLOW_LOG_COMPONENT_NAME_MAP</a></td></tr>
<tr class="memdesc:abef6a1249edc3dd6c7f650235a84bfe4"><td class="mdescLeft">&#160;</td><td class="mdescRight">The map generated by <a class="el" href="namespaceflow_1_1log.html" title="Flow module providing logging functionality.">flow::log</a> macro magic that maps each enumerated value in <a class="el" href="namespaceflow.html#a3938730ab4b89daf13d027a5f620e7ce" title="The flow::log::Component payload enumeration comprising various log components used by Flow&#39;s own int...">flow::Flow_log_component</a> to its string representation as used in log output and verbosity config.  <a href="namespaceflow.html#abef6a1249edc3dd6c7f650235a84bfe4">More...</a><br /></td></tr>
<tr class="separator:abef6a1249edc3dd6c7f650235a84bfe4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="abb2f9f3d34f909216637ac16e3321727" name="abb2f9f3d34f909216637ac16e3321727"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abb2f9f3d34f909216637ac16e3321727">&#9670;&nbsp;</a></span>FLOW_OS_LINUX</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define FLOW_OS_LINUX</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Macro that is defined if and only if the compiling environment is Linux. </p>

<p class="definition">Definition at line <a class="el" href="common_8hpp_source.html#l00089">89</a> of file <a class="el" href="common_8hpp_source.html">common.hpp</a>.</p>

</div>
</div>
<a id="ab38c55048f378ce506da9b5989b36dc5" name="ab38c55048f378ce506da9b5989b36dc5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab38c55048f378ce506da9b5989b36dc5">&#9670;&nbsp;</a></span>FLOW_OS_MAC</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define FLOW_OS_MAC</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Macro that is defined if and only if the compiling environment is Mac OS X or higher macOS (not iOS and such!). </p>

<p class="definition">Definition at line <a class="el" href="common_8hpp_source.html#l00092">92</a> of file <a class="el" href="common_8hpp_source.html">common.hpp</a>.</p>

</div>
</div>
<a id="aa97a4a2066a1727fa67917638a569a34" name="aa97a4a2066a1727fa67917638a569a34"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa97a4a2066a1727fa67917638a569a34">&#9670;&nbsp;</a></span>FLOW_OS_WIN</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define FLOW_OS_WIN</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Macro that is defined if and only if the compiling environment is Windows. </p>

<p class="definition">Definition at line <a class="el" href="common_8hpp_source.html#l00095">95</a> of file <a class="el" href="common_8hpp_source.html">common.hpp</a>.</p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Mar 28 2025 22:55:35 for Flow by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.4
</small></address>
</body>
</html>
